package com.hao.order.app.aop;

import com.hao.common.code.ErrorCode;
import com.hao.common.execption.BusinessException;
import com.hao.order.app.annotation.LoginCheck;
import com.hao.order.app.feign.UserFeign;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author haoge
 * @version 1.0
 * @date 2023/5/23 14:36
 */
@Aspect
@Component
public class LoginInterceptor {
    @Resource
    private UserFeign userFeign;

//    @Around ("@annotation(loginCheck)")
//    public Object doInterceptor(ProceedingJoinPoint joinPoint, LoginCheck loginCheck) throws Throwable {
//        Long login = userFeign.isLogin();
//        login = 6L;
//        return joinPoint.proceed();
//    }
}
